package com.yan.arrays;

import java.util.Random;
import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入一个数");
        int num = input.nextInt();
        int[] arr = new int[num];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = new Random().nextInt(10) + 1;
        }
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] > 5 && arr[i] % 2 == 0){
                System.out.print(arr[i] + " ");
            }
        }
        System.out.println();
        System.out.println("---------------------");
        for (int yuanSu : arr) {
            System.out.print(yuanSu + " ");
        }
    }

}
